<extend name="Public/base"/>
<block name="style">
<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap-fileinput/css/fileinput.css">
</block>
<block name="content">
	<h3>幻灯片管理</h3>
	<div class="panel panel-default">
		<div class="panel-heading"><if condition="$_GET['_action'] eq 'add'">新增<else/>编辑</if>幻灯片</div>
		<div class="panel-body">
			<!-- 表单 -->
			<form id="form" action="<{:addons_url('Slider://Slider/update')}>" method="post" class="form-horizontal">
				<!-- 基础文档模型 -->
				<div id="tab1" class="tab-pane in tab1">
					<div class="form-group">
						<label class="col-sm-2 control-label">标题</label>
						<div class="col-sm-3">
							<input type="text" class="text form-control" name="title" value="<{$info.title}>">
						</div>
						<span class="check-tips">请输入幻灯片标题</span>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">链接地址</label>
						<div class="col-sm-4">
							<input type="text" class="text form-control" name="link" value="<{$info.link}>">
						</div>
						<span class="check-tips">请填写带http://的全路径</span>
					</div>
					
					<div class="form-group">
						<label class="col-sm-2 control-label">按钮标题</label>
						<div class="col-sm-3">
							<input type="text" class="text form-control" name="link_title" value="<{$info.link_title}>">
						</div>
						<span class="check-tips">请输入幻灯片按钮标题</span>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">外链图片</label>
						<div class="col-sm-4">
							<input type="text" class="text form-control" name="img_url" value="<{$info.img_url}>">
						</div>
						<span class="check-tips">请填写外链路径</span>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">描述</label>
						<div class="col-sm-4">
							<textarea style="width:300px;height:80px;" name="description"><{$info.description}></textarea>
						</div>
						<span class="check-tips">请填写描述</span>
					</div>
					<div class="form-group">
						<label class="col-sm-2 control-label">站点图片</label>
						<div class="col-sm-5">
							<div class="input-group">
								<input type="hidden" name="cover_id" id="cover_id" value="<{$info.cover_id| default='0'}>">
								<input type="text" class="form-control" name="cover_link" id="cover"  value="">
								<a href="javascript:;"  class="input-group-addon up_pic" rel_url="#cover" rel_fileid="#cover_id" url="<{:U('File/uploadPicture',array('session_id'=>session_id()))}>">
									<span class="fa fa-cloud-upload"></span>
								</a>
							</div>			
							<div class="upload-img-box">
							<notempty name="info['cover_id']">
								<div class="upload-pre-item"><img style="max-height:160px;"		src="<{$info.cover_id|get_cover='path'}>"/></div>
							</notempty>
							</div>
						</div>
						
						  
						<span class="check-tips">上传图片优先级高于外链</span>
					</div>
				</div>
				<input type="hidden" name="id" value="<{$info.id}>"/>
				<div class="form-group">
					<div class="col-sm-4 col-sm-offset-2">
						<button class="btn btn-primary ajax-post" target-form="form-horizontal" type="submit">保存</button>
						<input class="btn btn-return" type="reset" value="重置" />
					</div>
				</div>
			</form>
		</div>
	</div>
</block>
<block name="script">
<script type="text/javascript" src="__STATIC__/bootstrap-fileinput/js/fileinput.js"></script>
<script type="text/javascript" src="__JS__/other.js?v=0.1"></script>
<script type="text/javascript">			
highlight_subnav("<{:U('Addons/adminList/name/Slider')}>");
</script>
</block>